<?php 
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
defined('_JEXEC') or die('Restricted access'); 


?>
<script type="text/javascript" language="javascript">
<!--
function submitbutton(pressbutton) {
	var form = document.adminForm;
	if ( pressbutton == 'save'){
		if (form.xml_file.value==null || form.xml_file.value=='')
		{
			alert('<?php echo JText::_('Please select file to upload !'); ?>');
			return;
		}
		else	
			submitform( pressbutton );
	}
	else
	{		
		submitform( pressbutton );
	}
}
//-->
</script>
 <div style="width: 100%; position: relative;">
 	<div style="margin-left: 1%; border: 1px solid #999999; padding:  4px;">
 		<img border="0" alt="Tooltip" src="<?php global $mainframe; echo $mainframe->getSiteURL()?>/includes/js/ThemeOffice/warning.png"/>
 		<?php echo JText::_('The XML file must be XML Spreadsheet type')?>
 	</div> 
 </div>
<form action="index.php" method="post" id='adminForm' name='adminForm' class="content-right" enctype="multipart/form-data">
	<fieldset class="adminform">
			<legend><?php echo JText::_( 'Import Categories' ); ?></legend>
			<table class="admintable">	
				<tr>
					<td class="key">
						<label for="pay_file">
							<?php echo JText::_( 'File' ); ?>
						</label>
					</td>
					<td>		
						<input id="xml_file" class="input_box" type="file" size="57" name="xml_file"/>
						<input class="button" type="button" onclick="submitbutton()" value="<?php echo JText::_('Upload File & Import');?>"/>
					</td>
				</tr>
			</table>
		</fieldset>						
		
		<input type="hidden" name="option" value="com_jajobboard" />
		<input type="hidden" name="view" value="jacategories" />
		<input type="hidden" name="task" value="import" />
		<?php echo JHTML::_( 'form.token' ); ?>	
	</fieldset>
</form>